package com.jm.springboot21.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.jm.springboot21.mapper.EmpMapper;
import com.jm.springboot21.pojo.Emp;
import com.jm.springboot21.pojo.PageBean;
import com.jm.springboot21.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    private EmpMapper empMapper;
    @Override
    public List<Emp> findAll() {
        return empMapper.findAll();
    }

    @Override
    public void addEmp(Emp emp) {
      empMapper.addEmp(emp);
    }

    @Override
    public Emp findById(int id) {
        return empMapper.findById(id);
    }

    @Override
    public List<Emp> findByName(String name) {
        return empMapper.findByName(name);
    }

    @Override
    public void deleteById(int id) {
       empMapper.deleteById(id);
    }

    @Override
    public void deleteByIds(List<Integer> ids) {
        empMapper.deleteByIds(ids);
    }

    @Override
    public void updateById(Emp emp) {
empMapper.updateById(emp);
    }

    @Override
    public Integer count() {
        return empMapper.count();
    }


}
